<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserDetailTable extends Migration
{
    /**
     * Run the  migrations.
     *
     * @return void
     */
    public function up()
    {
        if(!Schema::HasTable('userdetail')){
            Schema::create('userdetail',function(Blueprint $table){
                $table->increments('id');
                $table->string('nickName')->unique();
                $table->string('headPic')->default('/uploads/user/default.jpg');
                $table->string('QQ')->nullable();
                $table->string('phone')->unique()->nullable();
                $table->enum('sex', ['0', '1'])->default('0');
                $table->string('sign')->default('此人很懒，什么都没留下');
                $table->string('local')->nullable();
                $table->timestamps();
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // Schema::drop('userdetail');
    }
}
